﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<script type="text/javascript" src="../../Scripts/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../../Scripts/jquery-ui-1.8.21.custom.min.js"></script>

Scegli un corso: 
<%= Html.DropDownList("Corsi", (SelectList)ViewData["Corsi"]) %>

<br />

<%= ViewData["InfoMessage"] %>

<div id="iscritti"></div>

<script type="text/javascript">
    $(function () {
        
        var tipo = new Array();
        var stato = new Array();
        $("#save").button().attr('disabled', true).click(function () {
            $.ajax();
        });
        //select list change
        $('select').click(function () {
            if ($(this).attr('id') == 'Corsi') {
                $('#iscritti').load('/NewsLetter/GetUtentiIscritti/'+ $(this).val());
            }
            $("#save").button().attr('disabled', false);
        });
    });
</script>